home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.07 Jul 90 / Commando Programming ƒ / Rezscripts / RezC.WIND < prev    next >
Encoding:
Text File  |  1989-08-09  |  1.6 KB  |  91 lines  |  [TEXT/MPS ]

  1. ###################################
  2. ###    File RezC.WIND
  3. ### Generate Rez input for WIND Resources
  4. ### W. Powell    1988
  5.  
  6. Set Exit 0
  7. Set rid {1}
  8. Shift 1
  9. Echo -n "Resource ∂'WIND∂' ({rid}"
  10. If "{1}" == "-nms"
  11.     Set rname "{2}"
  12.     If ("{rname}" != "")
  13.         Echo -n ,∂""{rname}"∂"
  14.     End
  15.     Shift 2
  16. End
  17. If "{1}" == "-t"
  18.     Set tr {2}
  19.     Shift 2
  20. Else
  21.     Echo "### {0} Error: Rectangle args out of order"∂
  22.     >>Dev:StdErr
  23.     Exit 1
  24. End
  25. If "{1}" == "-l"
  26.     Set lr {2}
  27.     Shift 2
  28. Else
  29.     Echo "### {0} Error: Rectangle args out of order"∂
  30.     >>Dev:StdErr
  31.     Exit 1
  32. End
  33. If "{1}" == "-b"
  34.     Set br {2}
  35.     Shift 2
  36. Else
  37.     Echo "### {0} Error: Rectangle args out of order"∂
  38.     >>Dev:StdErr
  39.     Exit 1
  40. End
  41. If "{1}" == "-r"
  42.     Set rr {2}
  43.     Shift 2
  44. Else
  45.     Echo "### {0} Error: Rectangle args out of order"∂
  46.     >>Dev:StdErr
  47.     Exit 1
  48. End
  49. Set Vis "{1}"
  50. Shift 1
  51. If "{1}" == "-const"
  52.     Set RefCon "{2}"
  53.     Shift 2
  54. Else
  55.     Set RefCon 0
  56. End
  57. If "{1}" == "-title"
  58.     Set Label "{2}"
  59.     Shift 2
  60. Else
  61.     Set Label ""
  62. End
  63.  
  64. If ( "{1}" == "-sy" ) ; Echo -n ",SysHeap" ; Shift ; End
  65. If ( "{1}" == "-pu" ) ; Echo -n ",Purgeable" ; Shift ; End
  66. If ( "{1}" == "-lo" ) ; Echo -n ",Locked" ; Shift ; End
  67. If ( "{1}" == "-Pr" ) ; Echo -n ",Protected" ; Shift ; End
  68. If ( "{1}" == "-PL" ) ; Echo -n ",PreLoad" ; Shift ; End
  69. Echo ") ∂{"
  70. Set ProcID "{1}"
  71. Set CloseOp "{2}"
  72.  
  73. Echo "∂t∂{{tr},{lr},{br},{rr}∂},∂t∂t∂/* Bounds Rect *∂/"
  74. Echo "∂t{ProcID},∂t∂t∂/* Window Proc *∂/"
  75. If "{Vis}" == "-I"
  76.     Echo "∂tinvisible,"
  77. Else
  78.     Echo "∂tvisible,"
  79. End
  80. If "{CloseOp}" == "-goAway"
  81.     Echo "∂tgoAway,"
  82. Else
  83.     Echo "∂tnoGoAway,"
  84. End
  85. Echo "∂t{RefCon},∂t∂t∂/* RefCon *∂/"
  86. Echo "∂t∂"{Label}∂"∂t"
  87. Echo "∂};"
  88. Exit 0
  89.  
  90. ### End File RezC.WIND
  91. ####################################